This project represents our inaugural analysis of four companies within the commercial sector over a three-year period, from 2021 to 2023, segmented by quarters. The database utilized in this analysis is entirely hypothetical and does not reflect actual figures or pertain to any real-world company.
Through comprehensive data analysis, we have extracted key performance indicators (KPIs) for each of the four companies. Based on these KPIs, we have formulated conclusions and developed strategic recommendations for our organization.
Scenario: I am a financial analyst at Tech Company, which operates in a commercial market comprising four companies. Our company has been experiencing a decline in both product sales and profits over time, unlike our competitors who are enjoying high profitability.
->NOTE: If you have any confusing just read Print Function in the at the Code it will be highly enough.
Below is the original hypothetical database used in this analysis:
library(readxl)
library(dplyr)
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
library(tidyr)
options(width = 100)
income_statment <- read_excel("D:/Project/Project_Four_Companies(Orginal).xlsx", sheet = 1)
balance_sheet_Assets <- read_excel("D:/Project/Project_Four_Companies(Orginal).xlsx", sheet = 2)
balance_sheet_L_S <- read_excel("D:/Project/Project_Four_Companies(Orginal).xlsx", sheet = 3)
excel_data<-bind_rows(income_statment,balance_sheet_Assets,balance_sheet_L_S)
### Display the data
print(income_statment)
## # A tibble: 48 × 12
## Company Quarter Year Revenue COGS Gross_Profit Operating_Expenses EBIT Interest_Expense
## <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 Tech Q1 2021 648721. 365391. 283331. 189537. 93793. 1851.
## 2 Tech Q2 2021 565250. 260978. 304271. 127755. 176516. 4469.
## 3 Tech Q3 2021 758622. 454160. 304462. 172230. 132231. 11493.
## 4 Tech Q4 2021 669067. 350268. 318798. 143990. 174809. 3853.
## 5 Tech Q1 2022 881818. 429210. 452608. 256685. 195924. 5038.
## 6 Tech Q2 2022 518744. 278455. 240289. 121972. 118317. 8259.
## 7 Tech Q3 2022 656602. 344829. 311773. 133764. 178009. 9580.
## 8 Tech Q4 2022 922800. 489665. 433135. 250773. 182361. 6491.
## 9 Tech Q1 2023 639024. 348730. 290295. 178966. 111329. 4776.
## 10 Tech Q2 2023 595526. 336003. 259523. 150406. 109117. 2377.
## # ℹ 38 more rows
## # ℹ 3 more variables: EBT <dbl>, Tax_Expense <dbl>, Net_Income <dbl>
print(balance_sheet_Assets)
## # A tibble: 48 × 9
## Company Quarter Year Cash Accounts_Receivable Inventory Current_Assets Property_Plant_Equip…¹
## <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 Tech Q1 2021 108280. 67301. 60333. 235914. 443446.
## 2 Tech Q2 2021 74653. 57080. 36565. 168298. 511039.
## 3 Tech Q3 2021 59313. 84926. 59168. 203407. 722988.
## 4 Tech Q4 2021 121790. 108084. 66411. 296284. 429426.
## 5 Tech Q1 2022 55973. 113650. 48630. 218253. 678703.
## 6 Tech Q2 2022 80702. 102817. 33238. 216757. 316051.
## 7 Tech Q3 2022 88388. 127710. 61840. 277938. 612841.
## 8 Tech Q4 2022 67934. 129025. 86907. 283866. 641802.
## 9 Tech Q1 2023 72952. 67319. 69029. 209300. 552724.
## 10 Tech Q2 2023 132511. 92360. 46537. 271407. 451042.
## # ℹ 38 more rows
## # ℹ abbreviated name: ¹Property_Plant_Equipment
## # ℹ 1 more variable: Total_Assets <dbl>
print(balance_sheet_L_S)
## # A tibble: 48 × 12
## Company Quarter Year Accounts_Payable Short_Term_Debt Current_Liabilities Long_Term_Debt
## <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 Tech Q1 2021 64310. 82956. 147266. 160837.
## 2 Tech Q2 2021 34109. 64510. 98619. 127204.
## 3 Tech Q3 2021 52609. 114660. 167269. 162520.
## 4 Tech Q4 2021 47387. 107439. 154827. 201878.
## 5 Tech Q1 2022 47422. 130525. 177948. 209180.
## 6 Tech Q2 2022 51469. 70189. 121658. 202107.
## 7 Tech Q3 2022 68962. 93160. 162122. 202316.
## 8 Tech Q4 2022 92628. 98568. 191196. 284823.
## 9 Tech Q1 2023 56606. 90380. 146987. 251022.
## 10 Tech Q2 2023 43997. 82808. 126805. 144322.
## # ℹ 38 more rows
## # ℹ 5 more variables: Total_Liabilities <dbl>, Common_Stock <dbl>, Retained_Earnings <dbl>,
## # Shareholders_Equity <dbl>, Total_Liabilities_and_Equity <dbl>
Tech <- read_excel("D:/Project/P_Adjusted2.xlsx", sheet = 1)
## New names:
## • `` -> `...2`
## • `` -> `...3`
## • `` -> `...4`
## • `` -> `...5`
## • `` -> `...6`
## • `` -> `...7`
## • `` -> `...8`
## • `` -> `...9`
## • `` -> `...10`
## • `` -> `...11`
## • `` -> `...12`
## • `` -> `...13`
Speed <- read_excel("D:/Project/P_Adjusted2.xlsx", sheet = 2)
## New names:
## • `` -> `...2`
## • `` -> `...3`
## • `` -> `...4`
## • `` -> `...5`
## • `` -> `...6`
## • `` -> `...7`
## • `` -> `...8`
## • `` -> `...9`
## • `` -> `...10`
## • `` -> `...11`
## • `` -> `...12`
## • `` -> `...13`
Maclr <- read_excel("D:/Project/P_Adjusted2.xlsx", sheet = 3)
## New names:
## • `` -> `...2`
## • `` -> `...3`
## • `` -> `...4`
## • `` -> `...5`
## • `` -> `...6`
## • `` -> `...7`
## • `` -> `...8`
## • `` -> `...9`
## • `` -> `...10`
## • `` -> `...11`
## • `` -> `...12`
## • `` -> `...13`
Dain <- read_excel("D:/Project/P_Adjusted2.xlsx", sheet = 4)
## New names:
## • `` -> `...2`
## • `` -> `...3`
## • `` -> `...4`
## • `` -> `...5`
## • `` -> `...6`
## • `` -> `...7`
## • `` -> `...8`
## • `` -> `...9`
## • `` -> `...10`
## • `` -> `...11`
## • `` -> `...12`
## • `` -> `...13`
print(Tech)
## # A tibble: 33 × 13
## `Income Statement` ...2 ...3 ...4 ...5 ...6 ...7 ...8 ...9 ...10 ...11 ...12 ...13
## <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr>
## 1 <NA> 2021 <NA> <NA> <NA> 2022 <NA> <NA> <NA> 2023 <NA> <NA> <NA>
## 2 Quarter Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4
## 3 Revenue 648721 565250 758622 669067 881818 518744 656602 9228… 6390… 5955… 8699… 7310…
## 4 COGS 365391 260978 454160 350268 429210 278455 344829 4896… 3487… 3360… 3902… 4364…
## 5 Gross_Profit 283331 304271 304462 318798 452608 240289 311773 4331… 2902… 2595… 4797… 2946…
## 6 Operating_Expenses 189537 127755 172230 143990 256685 121972 133764 2507… 1789… 1504… 2122… 2128…
## 7 EBIT 93793 176516 132231 174809 195924 118317 178009 1823… 1113… 1091… 2674… 81743
## 8 Interest_Expense 1851 4469 11493 3853 5038 8259 9580 6491 4776 2377 12389 9481
## 9 EBT 91943 172047 120738 170956 190885 110058 168429 1758… 1065… 1067… 2550… 72262
## 10 Tax_Expense 27583 51614 36222 51287 57266 33017 50529 52761 31966 32022 76516 21679
## # ℹ 23 more rows
print(Speed)
## # A tibble: 33 × 13
## `Income Statement` ...2 ...3 ...4 ...5 ...6 ...7 ...8 ...9 ...10 ...11 ...12 ...13
## <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr>
## 1 <NA> 2021 <NA> <NA> <NA> 2022 <NA> <NA> <NA> 2023 <NA> <NA> <NA>
## 2 Quarter Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4
## 3 Revenue 657220 980669 551447 787047 641032 563315 994683 6580… 5749… 6772… 9009… 5206…
## 4 COGS 333620 576060 314556 347393 308822 310093 502147 3449… 3306… 2827… 3868… 2308…
## 5 Gross_Profit 283331 404609 236891 439655 332209 253222 492537 3130… 2442… 3944… 5140… 2897…
## 6 Operating_Expenses 186260 127755 163765 234290 171591 156534 286637 1428… 1323… 1391… 2163… 1178…
## 7 EBIT 93793 276854 73126 205365 160618 96688 205899 1702… 1119… 2553… 2977… 1719…
## 8 Interest_Expense 7072 4469 12872 6518 3458 9235 7179 13524 2566 6512 13653 7282
## 9 EBT 130267 158890 60254 198846 157160 87454 198721 1567… 1093… 2488… 2840… 1646…
## 10 Tax_Expense 39080 47667 18076 59654 47148 26236 59616 47029 32806 74642 85227 49403
## # ℹ 23 more rows
print(Maclr)
## # A tibble: 33 × 13
## `Income Statement` ...2 ...3 ...4 ...5 ...6 ...7 ...8 ...9 ...10 ...11 ...12 ...13
## <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr>
## 1 <NA> 2021 <NA> <NA> <NA> 2022 <NA> <NA> <NA> 2023 <NA> <NA> <NA>
## 2 Quarter Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4
## 3 Revenue 575230 588116 830948 610934 621120 844889 573364 8495… 8109… 6345… 5259… 7235…
## 4 COGS 309856 331783 495346 327718 297236 459040 306862 3521… 4031… 2562… 2906… 3484…
## 5 Gross_Profit 283331 256333 335602 283216 323884 385850 266502 4974… 4077… 3782… 2353… 3751…
## 6 Operating_Expenses 155277 127755 231040 174450 173750 226940 153783 2185… 1947… 1372… 1486… 1574…
## 7 EBIT 93793 128578 104562 108765 150134 158910 112719 2788… 2130… 2409… 86632 2176…
## 8 Interest_Expense 9862 4469 5103 4117 6447 13040 6570 7506 7960 3816 5566 16794
## 9 EBT 100234 117683 99459 104649 143687 145870 106149 2713… 2050… 2371… 81066 2008…
## 10 Tax_Expense 30070 35305 29838 31395 43106 43761 31845 81409 61521 71144 24320 60261
## # ℹ 23 more rows
print(Dain)
## # A tibble: 33 × 13
## `Income Statement` ...2 ...3 ...4 ...5 ...6 ...7 ...8 ...9 ...10 ...11 ...12 ...13
## <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr>
## 1 <NA> 2021 <NA> <NA> <NA> 2022 <NA> <NA> <NA> 2023 <NA> <NA> <NA>
## 2 Quarter Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4
## 3 Revenue 582244 600186 950352 970666 512620 562047 690394 8925… 7864… 9166… 7448… 8832…
## 4 COGS 316333 334554 556525 471660 214573 268560 402282 5346… 3462… 4559… 3622… 4041…
## 5 Gross_Profit 283331 265632 393827 499005 298047 293487 288113 3578… 4402… 4606… 3826… 4790…
## 6 Operating_Expenses 174002 127755 272291 243956 145761 136949 147043 2096… 2197… 1958… 1665… 2256…
## 7 EBIT 93793 137877 121536 255049 152286 156538 141069 1482… 2204… 2647… 2160… 2533…
## 8 Interest_Expense 9789 4469 4735 19283 2081 8831 9876 7790 6859 4909 4101 12799
## 9 EBT 82120 139069 116801 235767 150205 147707 131194 1404… 2136… 2598… 2119… 2405…
## 10 Tax_Expense 24636 41721 35040 70730 45061 44312 39358 42136 64083 77964 63579 72175
## # ℹ 23 more rows
After refining and adjusting the values, we are now ready to proceed with the analysis.
In the file provided below, you will find THREE SHEETS:
DATA <- read_excel("D:/Project/Measures.xlsx", sheet = 1)
print(DATA)
## # A tibble: 48 × 27
## Company Year `Current Ratio` `Quick Ratio` `Debt-To-equity` `Debt-To-Assets` `Debt-To-Captial`
## <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 TECH 21-Q1 1.60 1.19 0.657 0.359 0.396
## 2 TECH 21-Q2 1.71 1.34 0.423 0.282 0.297
## 3 TECH 21-Q3 1.22 0.862 0.465 0.299 0.317
## 4 TECH 21-Q4 1.91 1.48 0.838 0.426 0.456
## 5 TECH 22-Q1 1.23 0.953 0.666 0.379 0.400
## 6 TECH 22-Q2 1.78 1.51 1.30 0.511 0.566
## 7 TECH 22-Q3 1.71 1.33 0.561 0.332 0.360
## 8 TECH 22-Q4 1.48 1.03 0.853 0.414 0.460
## 9 TECH 23-Q1 1.42 0.954 0.938 0.448 0.484
## 10 TECH 23-Q2 2.14 1.77 0.503 0.314 0.335
## # ℹ 38 more rows
## # ℹ 20 more variables: `Interest-Coverage` <dbl>, `Recivables Turnover` <dbl>, DSO <dbl>,
## # `Payables Turnover` <dbl>, DPO <dbl>, `Inventory Turnover` <dbl>, DOH <dbl>,
## # `Cash Conversion Cycle` <dbl>, `Gross Profit Margin` <dbl>, `EBIT Margin` <dbl>,
## # `Tax Burden` <dbl>, `Interest Burden` <dbl>, `Net Profit Margin` <dbl>, `Asset-Turnover` <dbl>,
## # `Return-On-Assets` <dbl>, `Equity-Multiplier` <dbl>, `Return-On-Equity` <dbl>,
## # `Return-On-Total-Capital` <dbl>, `Operating-Return-On-Assets` <dbl>, …
Changes <- read_excel("D:/Project/Measures.xlsx", sheet = 2)
print(Changes)
## # A tibble: 48 × 27
## Company `CHANGES %` `Current Ratio` `Quick Ratio` `Debt-To-equity` `Debt-To-Assets`
## <chr> <chr> <dbl> <dbl> <dbl> <dbl>
## 1 Tech 21-Q1 0 0 0 0
## 2 Tech 21-Q2/21-Q1 0.0653 0.120 -0.356 -0.214
## 3 Tech 21-Q3/21-Q2 -0.287 -0.354 0.0990 0.0602
## 4 Tech 21-Q4/21-Q3 0.574 0.722 0.804 0.425
## 5 Tech 22-Q1/21-Q4 -0.359 -0.358 -0.205 -0.111
## 6 Tech 22-Q2/22-Q1 0.453 0.583 0.955 0.349
## 7 Tech 22-Q3/22-Q2 -0.0378 -0.116 -0.569 -0.351
## 8 Tech 22-Q4/22-Q3 -0.134 -0.227 0.519 0.249
## 9 Tech 23-Q1/22-Q4 -0.0409 -0.0736 0.100 0.0817
## 10 Tech 23-Q2/23-Q1 0.503 0.858 -0.463 -0.298
## # ℹ 38 more rows
## # ℹ 21 more variables: `Debt-To-Captial` <dbl>, `Interest-Coverage` <dbl>,
## # `Recivables Turnover` <dbl>, DSO <dbl>, `Payables Turnover` <dbl>, DPO <dbl>,
## # `Inventory Turnover` <dbl>, DOH <dbl>, `Cash Conversion Cycle` <dbl>,
## # `Gross Profit Margin` <dbl>, `EBIT Margin` <dbl>, `Tax Burden` <dbl>, `Interest Burden` <dbl>,
## # `Net Profit Margin` <dbl>, `Asset-Turnover` <dbl>, `Return-On-Assets` <dbl>,
## # `Equity-Multiplier` <dbl>, `Return-On-Equity` <dbl>, `Return-On-Total-Capital` <dbl>, …
Which Contain Four Main Measures
First: Financial_Health Measures
library(ggplot2)
library(plotly)
##
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
##
## last_plot
## The following object is masked from 'package:stats':
##
## filter
## The following object is masked from 'package:graphics':
##
## layout
library(dplyr)
library(tidyr)
# Define the data
quarters <- c('21-Q1', '21-Q2', '21-Q3', '21-Q4',
'22-Q1', '22-Q2', '22-Q3', '22-Q4',
'23-Q1', '23-Q2', '23-Q3', '23-Q4')
company_tech_gross <- c(44, 54, 40, 48, 51, 46, 47, 47, 45, 44, 55, 40)
company_speed_gross <- c(43, 41, 43, 56, 52, 45, 50, 48, 42, 58, 57, 56)
company_maclr_gross <- c(49, 44, 40, 46, 52, 46, 46, 59, 50, 60, 45, 52)
company_dain_gross <- c(49, 44, 41, 51, 58, 52, 42, 40, 56, 50, 51, 54)
company_tech_ebit <- c(14, 31, 17, 26, 22, 23, 27, 20, 17, 18, 31, 11)
company_speed_ebit <- c(14, 28, 13, 26, 25, 17, 21, 26, 19, 38, 33, 33)
company_maclr_ebit <- c(16, 22, 13, 18, 24, 19, 20, 33, 26, 38, 16, 30)
company_dain_ebit <- c(16, 23, 13, 26, 30, 28, 20, 17, 28, 29, 29, 29)
company_tech_net <- c(10, 21, 11, 18, 15, 15, 18, 13, 12, 13, 21, 7)
company_speed_net <- c(14, 11, 8, 18, 17, 11, 14, 17, 13, 26, 22, 22)
company_maclr_net <- c(12, 14, 8, 12, 16, 12, 13, 22, 18, 26, 11, 19)
company_dain_net <- c(10, 16, 9, 17, 21, 18, 13, 11, 19, 20, 20, 19)
data_gross <- data.frame(
Quarter = quarters,
Tech = company_tech_gross,
Speed = company_speed_gross,
Maclr = company_maclr_gross,
Dain = company_dain_gross,
Measure = "Gross_Profit_Margin"
)
data_ebit <- data.frame(
Quarter = quarters,
Tech = company_tech_ebit,
Speed = company_speed_ebit,
Maclr = company_maclr_ebit,
Dain = company_dain_ebit,
Measure = "EBIT_Margin"
)
data_net <- data.frame(
Quarter = quarters,
Tech = company_tech_net,
Speed = company_speed_net,
Maclr = company_maclr_net,
Dain = company_dain_net,
Measure = "Net_Profit_Margin"
)
data <- rbind(data_gross, data_ebit, data_net)
# Use pivot_longer to reshape the data
data <- data %>% pivot_longer(cols = c(Tech, Speed, Maclr, Dain), names_to = "Company", values_to = "Value")
# Create a numeric quarter column for trend lines
data <- data %>%
mutate(Quarter_Num = as.numeric(factor(Quarter, levels = quarters)))
# Plot function
plot_measure <- function(data, measure, y_label) {
data_filtered <- data %>% filter(Measure == measure)
p <- ggplot(data_filtered, aes(x = Quarter, y = Value, fill = Company)) +
geom_bar(stat = "identity", position = "dodge") +
geom_smooth(aes(x = Quarter_Num, y = Value, color = Company), method = "lm", se = FALSE) +
labs(title = paste(measure, "Comparison"),
x = "Year-Quarter",
y = y_label,
fill = "Company") +
theme_minimal() +
theme(axis.text.x = element_text(angle = 45, hjust = 1))
ggplotly(p)
}
# Plot Gross Profit Margin
Gross_Margin <- plot_measure(data, "Gross_Profit_Margin", "Gross Profit Margin (%)")
## `geom_smooth()` using formula = 'y ~ x'
Gross_Margin
# Plot EBIT Margin
EBIT_Margin <- plot_measure(data, "EBIT_Margin", "EBIT Margin (%)")
## `geom_smooth()` using formula = 'y ~ x'
EBIT_Margin
# Plot Net Profit Margin
Net_Profit_Margin <- plot_measure(data, "Net_Profit_Margin", "Net Profit Margin (%)")
## `geom_smooth()` using formula = 'y ~ x'
Net_Profit_Margin
library(ggplot2)
library(plotly)
library(dplyr)
library(tidyr)
# Define the data
quarters <- c('21-Q1', '21-Q2', '21-Q3', '21-Q4',
'22-Q1', '22-Q2', '22-Q3', '22-Q4',
'23-Q1', '23-Q2', '23-Q3', '23-Q4')
company_tech_roa <- c(9, 15, 10, 33, 19, 11, 13, 27, 10, 8, 20, 16)
company_speed_roa <- c(10, 13, 5, 29, 15, 7, 16, 26, 10, 21, 26, 45)
company_maclr_roa <- c(12, 16, 10, 11, 17, 19, 10, 27, 27, 16, 7, 17)
company_dain_roa <- c(11, 16, 9, 17, 17, 14, 12, 10, 17, 20, 18, 19)
company_tech_roe <- c(17, 27, 14, 32, 26, 37, 22, 27, 20, 17, 25, 25)
company_speed_roe <- c(15, 19, 12, 24, 31, 13, 42, 23, 17, 60, 31, 47)
company_maclr_roe <- c(24, 44, 27, 19, 34, 54, 29, 48, 80, 24, 11, 35)
company_dain_roe <- c(28, 30, 20, 29, 28, 22, 21, 21, 27, 51, 33, 43)
company_tech_oroa <- c(28, 26, 16, 21, 24, 17, 25, 20, 13, 15, 29, 9)
company_speed_oroa <- c(20, 27, 9, 26, 19, 13, 24, 20, 14, 35, 35, 23)
company_maclr_oroa <- c(32, 23, 17, 15, 23, 28, 18, 39, 34, 30, 9, 26)
company_dain_oroa <- c(36, 24, 16, 27, 19, 23, 18, 17, 24, 29, 25, 30)
data_roa <- data.frame(
Quarter = quarters,
Tech = company_tech_roa,
Speed = company_speed_roa,
Maclr = company_maclr_roa,
Dain = company_dain_roa,
Measure = "ROA"
)
data_roe <- data.frame(
Quarter = quarters,
Tech = company_tech_roe,
Speed = company_speed_roe,
Maclr = company_maclr_roe,
Dain = company_dain_roe,
Measure = "ROE"
)
data_oroa <- data.frame(
Quarter = quarters,
Tech = company_tech_oroa,
Speed = company_speed_oroa,
Maclr = company_maclr_oroa,
Dain = company_dain_oroa,
Measure = "Operating_ROA"
)
data <- rbind(data_roa, data_roe, data_oroa)
# Use pivot_longer to reshape the data
data <- data %>% pivot_longer(cols = c(Tech, Speed, Maclr, Dain), names_to = "Company", values_to = "Value")
# Create a numeric quarter column for trend lines
data <- data %>%
mutate(Quarter_Num = as.numeric(factor(Quarter, levels = quarters)))
# Plot function
plot_measure <- function(data, measure, y_label) {
data_filtered <- data %>% filter(Measure == measure)
p <- ggplot(data_filtered, aes(x = Quarter, y = Value, fill = Company)) +
geom_bar(stat = "identity", position = "dodge") +
geom_smooth(aes(x = Quarter_Num, y = Value, color = Company), method = "lm", se = FALSE) +
labs(title = paste(measure, "Comparison"),
x = "Year-Quarter",
y = y_label,
fill = "Company") +
theme_minimal() +
theme(axis.text.x = element_text(angle = 45, hjust = 1))
ggplotly(p)
}
# Plot ROA
ROA <- plot_measure(data, "ROA", "ROA (%)")
## `geom_smooth()` using formula = 'y ~ x'
ROA
# Plot ROE
ROE <- plot_measure(data, "ROE", "ROE (%)")
## `geom_smooth()` using formula = 'y ~ x'
ROE
# Plot Operating ROA
OROA <- plot_measure(data, "Operating_ROA", "Operating ROA (%)")
## `geom_smooth()` using formula = 'y ~ x'
OROA
Second: Solvency Measures
library(ggplot2)
library(plotly)
library(dplyr)
library(tidyr)
# Define the data
quarters <- c('21-Q1', '21-Q2', '21-Q3', '21-Q4',
'22-Q1', '22-Q2', '22-Q3', '22-Q4',
'23-Q1', '23-Q2', '23-Q3', '23-Q4')
company_tech_debt_to_assets <- c(36, 28, 30, 43, 38, 51, 33, 41, 45, 31, 33, 59)
company_speed_debt_to_assets <- c(26, 40, 33, 34, 43, 37, 52, 37, 37, 51, 31, 47)
company_maclr_debt_to_assets <- c(43, 56, 56, 35, 43, 56, 56, 35, 57, 27, 31, 43)
company_dain_debt_to_assets <- c(50, 40, 46, 37, 35, 35, 36, 44, 29, 53, 39, 50)
company_tech_debt_to_equity <- c(66, 42, 46, 84, 67, 130, 56, 85, 94, 50, 53, 191)
company_speed_debt_to_equity <- c(38, 77, 56, 58, 83, 64, 138, 64, 66, 119, 50, 99)
company_maclr_debt_to_equity <- c(86, 156, 158, 62, 86, 156, 158, 62, 173, 42, 49, 90)
company_dain_debt_to_equity <- c(126, 76, 103, 64, 58, 58, 62, 92, 46, 136, 72, 110)
company_tech_debt_to_capital <- c(40, 30, 32, 46, 40, 57, 36, 46, 48, 33, 34, 66)
company_speed_debt_to_capital <- c(27, 43, 36, 37, 45, 39, 58, 39, 40, 54, 33, 50)
company_maclr_debt_to_capital <- c(46, 61, 61, 38, 46, 61, 61, 38, 63, 30, 33, 47)
company_dain_debt_to_capital <- c(56, 43, 51, 39, 37, 37, 38, 48, 31, 58, 42, 52)
data_debt_to_assets <- data.frame(
Quarter = quarters,
Tech = company_tech_debt_to_assets,
Speed = company_speed_debt_to_assets,
Maclr = company_maclr_debt_to_assets,
Dain = company_dain_debt_to_assets,
Measure = "Debt_To_Assets"
)
data_debt_to_equity <- data.frame(
Quarter = quarters,
Tech = company_tech_debt_to_equity,
Speed = company_speed_debt_to_equity,
Maclr = company_maclr_debt_to_equity,
Dain = company_dain_debt_to_equity,
Measure = "Debt_To_Equity"
)
data_debt_to_capital <- data.frame(
Quarter = quarters,
Tech = company_tech_debt_to_capital,
Speed = company_speed_debt_to_capital,
Maclr = company_maclr_debt_to_capital,
Dain = company_dain_debt_to_capital,
Measure = "Debt_To_Capital"
)
data <- bind_rows(data_debt_to_assets, data_debt_to_equity, data_debt_to_capital)
data <- data %>% pivot_longer(cols = c(Tech, Speed, Maclr, Dain), names_to = "Company", values_to = "Value")
# Create a numeric quarter column for trend lines
data <- data %>%
mutate(Quarter_Num = as.numeric(factor(Quarter, levels = quarters)))
# Plot function
plot_measure <- function(data, measure, y_label) {
data_filtered <- data %>% filter(Measure == measure)
p <- ggplot(data_filtered, aes(x = Quarter, y = Value, fill = Company)) +
geom_bar(stat = "identity", position = "dodge") +
geom_smooth(aes(x = Quarter_Num, y = Value, color = Company), method = "lm", se = FALSE) +
labs(title = paste(measure, "Comparison"),
x = "Year-Quarter",
y = y_label,
fill = "Company") +
theme_minimal() +
theme(axis.text.x = element_text(angle = 45, hjust = 1))
ggplotly(p)
}
# Plot Debt-To-Assets
Debt_To_Assets <- plot_measure(data, "Debt_To_Assets", "Debt-To-Assets (%)")
## `geom_smooth()` using formula = 'y ~ x'
Debt_To_Assets
# Plot Debt-To-Equity
Debt_To_Equity <- plot_measure(data, "Debt_To_Equity", "Debt-To-Equity (%)")
## `geom_smooth()` using formula = 'y ~ x'
Debt_To_Equity
# Plot Debt-To-Capital
Debt_To_Capital <- plot_measure(data, "Debt_To_Capital", "Debt-To-Capital (%)")
## `geom_smooth()` using formula = 'y ~ x'
Debt_To_Capital
Third: Activity Measures
library(ggplot2)
library(plotly)
library(dplyr)
library(tidyr)
# Define the data
quarters <- c('21-Q1', '21-Q2', '21-Q3', '21-Q4',
'22-Q1', '22-Q2', '22-Q3', '22-Q4',
'23-Q1', '23-Q2', '23-Q3', '23-Q4')
# Data for each measure
company_tech_receivable <- c(19.28, 9.09, 10.68, 7.02, 5.89, 8.58, 4.06, 5.09, 13.71, 6.92, 3.64, 10.73)
company_speed_receivable <- c(10.52, 6.64, 4.39, 4.82, 12.17, 7.92, 4.39, 8.04, 7.16, 5.41, 6.24, 11.57)
company_maclr_receivable <- c(18.78, 6.94, 7.54, 8.55, 9.97, 5.74, 7.53, 5.90, 7.43, 6.24, 8.84, 3.66)
company_dain_receivable <- c(14.71, 6.55, 7.75, 7.32, 13.50, 5.61, 6.42, 6.54, 6.22, 5.62, 7.21, 4.86)
company_tech_payable <- c(11.36, 5.30, 10.47, 7.01, 9.05, 5.63, 5.73, 7.80, 12.32, 15.27, 7.33, 6.88)
company_speed_payable <- c(10.30, 8.03, 5.02, 6.35, 6.10, 7.59, 7.27, 4.50, 11.34, 12.63, 7.23, 5.08)
company_maclr_payable <- c(18.05, 8.65, 9.21, 5.30, 6.40, 11.97, 5.71, 6.08, 15.92, 6.01, 4.62, 6.31)
company_dain_payable <- c(11.10, 6.96, 8.95, 6.96, 5.47, 9.59, 11.25, 9.87, 10.72, 11.89, 5.98, 9.08)
company_tech_inventory <- c(12.11, 5.39, 9.49, 5.58, 7.46, 6.80, 7.25, 6.58, 4.47, 5.81, 8.76, 6.85)
company_speed_inventory <- c(11.73, 7.30, 4.24, 6.86, 5.87, 6.11, 8.66, 6.43, 7.04, 6.18, 8.61, 6.05)
company_maclr_inventory <- c(14.01, 6.02, 6.14, 4.54, 6.37, 8.32, 3.80, 4.88, 9.64, 5.99, 5.24, 6.41)
company_dain_inventory <- c(10.17, 5.76, 7.14, 5.06, 3.64, 7.58, 7.69, 7.59, 6.17, 10.79, 8.19, 7.74)
company_tech_cash <- c(16.95, 39.09, 37.78, 65.33, 70.60, 31.40, 76.44, 80.36, 78.61, 91.63, 92.15, 34.22)
company_speed_cash <- c(30.39, 59.54, 96.43, 71.40, 32.30, 57.68, 75.05, 21.08, 70.64, 97.63, 50.35, 20.02)
company_maclr_cash <- c(25.27, 71.06, 68.26, 54.23, 36.85, 76.96, 80.50, 76.71, 64.05, 58.65, 32.01, 98.85)
company_dain_cash <- c(27.80, 66.60, 57.39, 69.60, 60.59, 75.15, 71.85, 66.98, 83.79, 68.07, 34.10, 82.05)
data_receivable <- data.frame(
Quarter = quarters,
Company = rep(c('Tech', 'Speed', 'Maclr', 'Dain'), each = length(quarters)),
Value = c(company_tech_receivable, company_speed_receivable, company_maclr_receivable, company_dain_receivable),
Measure = 'Receivable Turnover'
)
data_payable <- data.frame(
Quarter = quarters,
Company = rep(c('Tech', 'Speed', 'Maclr', 'Dain'), each = length(quarters)),
Value = c(company_tech_payable, company_speed_payable, company_maclr_payable, company_dain_payable),
Measure = 'Payable Turnover'
)
data_inventory <- data.frame(
Quarter = quarters,
Company = rep(c('Tech', 'Speed', 'Maclr', 'Dain'), each = length(quarters)),
Value = c(company_tech_inventory, company_speed_inventory, company_maclr_inventory, company_dain_inventory),
Measure = 'Inventory Turnover'
)
data_cash <- data.frame(
Quarter = quarters,
Company = rep(c('Tech', 'Speed', 'Maclr', 'Dain'), each = length(quarters)),
Value = c(company_tech_cash, company_speed_cash, company_maclr_cash, company_dain_cash),
Measure = 'Cash Conversion Cycle'
)
data <- bind_rows(data_receivable, data_payable, data_inventory, data_cash)
# Create a numeric quarter column for trend lines
data <- data %>%
mutate(Quarter_Num = as.numeric(factor(Quarter, levels = quarters)))
# Plot function
plot_measure <- function(data, measure, y_label) {
data_filtered <- data %>% filter(Measure == measure)
p <- ggplot(data_filtered, aes(x = Quarter, y = Value, fill = Company)) +
geom_bar(stat = "identity", position = "dodge") +
geom_smooth(aes(x = Quarter_Num, y = Value, color = Company), method = "lm", se = FALSE) +
labs(title = paste(measure, "Comparison"),
x = "Year-Quarter",
y = y_label,
fill = "Company") +
theme_minimal() +
theme(axis.text.x = element_text(angle = 45, hjust = 1))
ggplotly(p)
}
# Plot Receivable Turnover
Receivable_Turnover <- plot_measure(data, "Receivable Turnover", "Receivable Turnover")
## `geom_smooth()` using formula = 'y ~ x'
Receivable_Turnover
# Plot Payable Turnover
Payable_Turnover <- plot_measure(data, "Payable Turnover", "Payable Turnover")
## `geom_smooth()` using formula = 'y ~ x'
Payable_Turnover
# Plot Inventory Turnover
Inventory_Turnover <- plot_measure(data, "Inventory Turnover", "Inventory Turnover")
## `geom_smooth()` using formula = 'y ~ x'
Inventory_Turnover
# Plot Cash Conversion Cycle
CCC <- plot_measure(data, "Cash Conversion Cycle", "Cash Conversion Cycle")
## `geom_smooth()` using formula = 'y ~ x'
CCC
Finally: Liquidity Measures
library(ggplot2)
library(plotly)
library(dplyr)
library(tidyr)
# Define the data
quarters <- c('21-Q1', '21-Q2', '21-Q3', '21-Q4',
'22-Q1', '22-Q2', '22-Q3', '22-Q4',
'23-Q1', '23-Q2', '23-Q3', '23-Q4')
# Current Ratio data
current_ratio_tech <- c(1.60, 1.71, 1.22, 1.91, 1.23, 1.78, 1.71, 1.48, 1.42, 2.14, 1.69, 1.16)
current_ratio_speed <- c(2.12, 1.20, 1.87, 1.49, 1.31, 1.82, 1.00, 1.93, 1.87, 1.39, 1.17, 1.69)
current_ratio_maclr <- c(2.37, 1.61, 1.68, 1.31, 2.37, 1.61, 1.68, 1.31, 1.23, 1.48, 2.40, 1.59)
current_ratio_dain <- c(1.26, 2.63, 1.63, 1.80, 1.65, 1.73, 2.24, 1.07, 1.72, 1.02, 1.24, 1.82)
# Quick Ratio data
quick_ratio_tech <- c(1.19, 1.34, 0.86, 1.48, 0.95, 1.51, 1.33, 1.03, 0.95, 1.77, 1.46, 0.71)
quick_ratio_speed <- c(1.71, 0.83, 1.51, 1.14, 0.99, 1.47, 0.77, 1.62, 1.48, 1.12, 0.89, 1.49)
quick_ratio_maclr <- c(1.90, 1.14, 1.13, 1.03, 1.90, 1.14, 1.13, 1.03, 1.03, 1.19, 1.83, 1.28)
quick_ratio_dain <- c(0.90, 2.12, 1.12, 1.26, 1.39, 1.43, 1.71, 0.79, 1.47, 0.82, 1.02, 1.50)
data_current <- data.frame(
Quarter = rep(quarters, 4),
Company = rep(c('Tech', 'Speed', 'Maclr', 'Dain'), each = length(quarters)),
Value = c(current_ratio_tech, current_ratio_speed, current_ratio_maclr, current_ratio_dain),
Measure = 'Current Ratio'
)
data_quick <- data.frame(
Quarter = rep(quarters, 4),
Company = rep(c('Tech', 'Speed', 'Maclr', 'Dain'), each = length(quarters)),
Value = c(quick_ratio_tech, quick_ratio_speed, quick_ratio_maclr, quick_ratio_dain),
Measure = 'Quick Ratio'
)
data <- bind_rows(data_current, data_quick)
# Create a numeric quarter column for trend lines
data <- data %>%
mutate(Quarter_Num = as.numeric(factor(Quarter, levels = quarters)))
# Plot function
plot_measure <- function(data, measure, y_label) {
data_filtered <- data %>% filter(Measure == measure)
p <- ggplot(data_filtered, aes(x = Quarter, y = Value, fill = Company)) +
geom_bar(stat = "identity", position = "dodge") +
geom_smooth(aes(x = Quarter_Num, y = Value, color = Company), method = "lm", se = FALSE) +
labs(title = paste(measure, "Comparison"),
x = "Year-Quarter",
y = y_label,
fill = "Company") +
theme_minimal() +
theme(axis.text.x = element_text(angle = 45, hjust = 1))
ggplotly(p)
}
# Plot Current Ratio
Current_Ratio <- plot_measure(data, "Current Ratio", "Current Ratio")
## `geom_smooth()` using formula = 'y ~ x'
Current_Ratio
# Plot Quick Ratio
Quick_Ratio <- plot_measure(data, "Quick Ratio", "Quick Ratio")
## `geom_smooth()` using formula = 'y ~ x'
Quick_Ratio
Speed: Upon reviewing its data, it is evident that this company is the dominant player in the commercial sector. This dominance has allowed it to impose strict controls on Accounts Receivable, enabling the company to collect its funds promptly at the end of each quarter (“For example, if a customer purchases on account for $100,000 at the beginning of Q1 2021, they have until the end of Q1 2022 to settle the amount due”). This practice contributes to fluctuations in the Cash Conversion Cycle each year. Regarding the company’s debt, the Solvency Ratios indicate that the company leverages its market power and dominance to increase its borrowing capacity. This has significantly impacted the Net Profit Margin, as the higher level of debt has effectively reduced the company’s tax burden. In terms of profitability, the key indicators, ROE (Return on Equity) and OROA (Operating Return on Operating Assets), show positive performance for two reasons. Firstly, OROA remains strong because the company has maintained stable inventory turnover (meaning the period in which the inventory is quickly sold). Secondly, ROE has remained stable due to the improvement and consistency in the Dupont Analysis.
Maclr: Similar to the previous company, Maclr has comparable Margin rates, which is expected for all companies in this sector due to the above-average economic conditions and demand. In contrast to the previous company, Maclr does not impose any restrictions on Accounts Receivables. This is evident from the low Receivable Turnover over the years, which has significantly impacted the Cash Conversion Cycle by extending it. This extension is detrimental to any commercial company aiming to shorten the cycle for quick cash collection and inventory purchases. Consequently, this has also negatively affected the Activity Ratios, showing a decline over the years. Regarding Solvency, despite the cash flow issue, the company’s Net Profit Margin remains stable and does not decline. This is because the company heavily relies on external debt rather than operating cash flow and liquidity. Although this strategy has reduced taxes and increased net income, it places the company at high risk of bankruptcy if it fails to meet its debt obligations. This issue is further highlighted by the declining Profitability Ratios over the coming years, confirming the problem of reduced operating efficiency. Additionally, the declining inventory turnover over the years indicates that the company is struggling with its operational systems.
Dain: Regarding Margins, there are no issues, and the indicators are normal, similar to other companies in the same sector. However, Dain faces a problem similar to Maclr, as it does not appear to impose any restrictions on Accounts Receivables. The consequences of this have already been discussed in the case of Maclr. One significant difference is that Dain has a high inventory turnover, indicating it sells its products quickly, almost surpassing the dominant company, Speed. This efficiency has also helped Dain reduce its Cash Conversion Cycle. Additionally, Dain has managed to extend its Payable Turnover without adversely affecting its operations over the years. Therefore, its only issue lies in the Receivable Turnover. Regarding debt, Dain is similar to Maclr, except for the bankruptcy risk. Dain has sufficient liquidity from its operating activities to manage its debt obligations, especially short-term debts.
Tech: Unlike the other companies, Tech shows a decrease in Margin Ratios, which is unusual compared to the surrounding companies. Another issue is the lack of restrictions on Accounts Receivables, despite stable inventory turnover rates and an increase in Payable Turnover. The lack of controls on Accounts Receivables has significantly extended the Cash Conversion Cycle due to the decrease in Receivable Turnover Ratio. This situation poses a greater risk to the company, particularly if bad debt and the Allowance for Doubtful Accounts increase, which could severely weaken its liquidity ratios. Although the company does not rely on debt to the same extent as other companies, this will affect the stability of its operating systems. The ROA indicator is stable but tends to decline in the coming years. The OROA has decreased significantly due to the company’s deteriorating ability to increase sales and another reason that will be mentioned later. Now, addressing the crucial point, the company has declining Margins despite the surrounding companies not experiencing similar issues. If we look at the Gross Profit Margin, it is lower compared to other companies. This could be due to one of two reasons: either the company is not well-known and thus sells less, which is unlikely since the data shows that all four companies have nearly equal profits, or the second and more likely reason is that Tech’s product pricing is higher than that of other companies. Upon investigating, it was found that Tech has higher Costs of Goods Sold compared to the other companies. Regarding the EBIT Margin (Earnings Before Interest and Tax), it has been low over the years, also due to higher Operating Expenses than the other companies. Ultimately, this has resulted in a lower Net Profit Margin. Additionally, the lower debt levels compared to other companies have led to higher taxes for Tech compared to its peers.
->Now that we have reviewed each company, summarizing their advantages and disadvantages, let’s discuss the solutions that should be presented to Tech, in order to make it competitive with Speed and other Companies.
1-Cost Analysis and Value Engineering: The first step Tech should take is to thoroughly examine its costs by implementing value engineering techniques. This involves identifying and eliminating all non-value-added activities to reduce overall costs. By doing so, the company can lower its product prices, thereby increasing its Gross Profit Margin and enhancing its inventory turnover.
2-Implementing Appropriate Controls on Accounts Receivables: After reducing prices, the company should introduce suitable controls on Accounts Receivables that align with its market position. This strategy will help increase the Receivable Turnover, thereby shortening the Cash Conversion Cycle. Consequently, this will improve liquidity and boost operating activities.
3-Optimizing Debt-to-Equity Ratio: Once the company stabilizes and its market value increases, it can leverage the third crucial factor: optimizing its Debt-to-Equity ratio. By aligning its debt levels with its financial position and liquidity at that time, the company can increase its Net Profit Margin and benefit from a reduction in taxes.
Implementing these strategies will enhance Tech’s competitiveness with Speed and other Companies and improve its overall financial performance.